<?php
$this->headTitle($this->translate('District manage'));
$this->headLink()
    ->appendStylesheet($this->STATIC_URL. '/themes/body.css')
    ->appendStylesheet($this->STATIC_URL. '/themes/file.css');
$this->headStyle('
div.filelist dl dt a {
	background-image:url("'. $this->STATIC_URL .'/themes/icons/property.png");
}'); ?>

<h2>
	<span><?php echo $this->translate('District manage')?></span>
	<a href="<?php echo $this->url(array(
		'action'=> 'create',
		'pid'=> $this->district->aid
		))?>"><?php echo $this->translate('Create district')?></a>
</h2>

<dl class="zend_form">
<dt>&nbsp;</dt>
<dd>
<fieldset>
    <legend>区域列表</legend>
    <div class="filelist">
	<p><em>
			<a href="<?php echo $this->url(array(
                'aid'=> NULL,
                'pid'=> NULL
            ))?>">全国省区</a>：
			<?php if (isset($this->path)) {
                while ($district = array_pop($this->path)) {
					echo '<a href="'. $this->url(array('pid'=> $district->aid)) .'">'. $district->name .'</a> » ';
				}
			} if (isset($this->district)) {
                echo $this->district->name .'';
			}?>
	</em></p>
<?php if (count($this->entries)): ?>
<?php foreach ($this->entries as $district): ?>
    <dl>
        <dt><a href="<?php echo $this->url(array('aid'=> NULL, 'pid'=> $district->aid));?>"></a></dt>
        <dd title="<?php echo $district->name ?>"><?php echo $district->name ?></dd>
    </dl>
<?php endforeach;?>
<?php endif;?>
    </div>
</fieldset>

<?php if (isset($this->district)) {?>
<p>
	<input type="button" onClick="location.href='<?php echo $this->url(array(
		'action'=> 'modify',
		'aid'=> $this->district->aid
		))?>'" value="编辑<?php echo $this->district->name?>" />
</p>
<?php }?>
</dd>
</dl>